<extend name="./Public/main" />
<block name="main">
    <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-sm-12">
            <div class="middle-box text-center animated fadeInDown">
		        <h2 class="font-bold" style="color:red">
		           {$message}
		           <if condition="substr_count($error,'#') neq 0">
		             {:substr($error,0,strpos($error,'#'))}
		             <else />
		              {$error}
		           </if>
		        </h2>
		
		        <div class="error-desc" style="margin-top:20px">
                                               页面将在<b id="wait">{$waitSecond}</b>秒后<a id="href" href="{$jumpUrl}">跳转</a>
                    
               </div>
               <if condition="(stristr($error,'#') neq false) && strrpos($error,'#') neq false">
	               <div class="error-desc" style="margin-top:10px">
	                      <a href="javascript:;" onclick="showError()" class="btn btn-primary m-t">查看详细信息</a><br/>
	                      <div id="showError" class="show_error" style="color:red;margin-top:10px;">
	                         {:substr($error,strpos($error,'#')+1,strrpos($error,'#')-strpos($error,'#')-1)}
	                      </div>
	                      
	               </div>
               </if>
		    </div>

            </div>
        </div>
    </div>
    <style>
    .show_error{
	     display:none;
    }
    </style>
    <script>
	    var wait = document.getElementById('wait'),href = document.getElementById('href').href;
	    var interval = setInterval(function(){
	        var time = --wait.innerHTML;
	        if(time <= 0) {
	            location.href = href;
	            clearInterval(interval);
	        };
	    }, 1000);
    </script>
    <script>
     function showError(){
    	 clearInterval(interval);
    	 $("#showError").toggleClass("show_error");
     }
    </script>
</block>
